package com.hsmpay.mobile.dao.terminal.impl;

import com.hsmpay.common.dao.Impl.BaseDaoSupport;
import com.hsmpay.mobile.dao.terminal.TerminalVersionDao;
import com.hsmpay.mobile.pojo.terminal.TerminalVersion;
import org.springframework.stereotype.Repository;

import java.sql.SQLException;

/**
 * 终端版本 sqlmap 接口 terminalVersionDao
 * 对应pojo TerminalVersion
 *
 * @author 颜铃璋
 *         创建时间：2013-8-20
 */
@Repository("terminalVersionDao")
public class TerminalVersionDaoImpl extends BaseDaoSupport<TerminalVersion, Long> implements TerminalVersionDao<TerminalVersion, Long> {
    /**
     * 查询最新版本
     *
     * @param terminalVersion terminalId
     *                        clientType
     * @return
     * @throws SQLException
     */
    public TerminalVersion searchLatestVersion(TerminalVersion terminalVersion) throws SQLException {
        return (TerminalVersion) getSqlMapClientTemplate().queryForObject("terminalVersionSqlMap.searchLatestVersion", terminalVersion);
    }
}
